package com.lxf.cloudotherserve.mapper;

import com.lxf.cloudotherserve.bean.CommentIsLikeBean;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Component;

import java.util.Optional;

/**
 * @author 罗兴发
 * @data 2025/6/23 11:54
 * @description：es持久层
 */
@Component
public interface CommentIsLikeItemRepository extends ElasticsearchRepository<CommentIsLikeBean, String> {
    /**
     * 根据用户ID和评论ID查询浏览记录
     * @param userId 用户ID
     * @param comId 评论ID
     * @return 返回分页结果集
     */
    Optional<CommentIsLikeBean> findAllByUserIdAndComId(Integer userId, Integer comId);
}